package com.letoy.edu.controller;

import com.letoy.edu.entity.MyApi;
import com.letoy.edu.service.UserApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@Api(value = "Api权限管理", tags = "Api权限管理API")
public class ApiManageController {

    @Autowired
    UserApiService userApiService;

    @PostMapping("/api/insertApi")
    @ApiOperation(value = "插入Api", notes = "插入Api")
    @ApiImplicitParam(value = "", name = "Authorization", paramType = "header", dataType = "String", required = true)
    private Map<String, Object> insertApi(MyApi myApi) {
        return userApiService.insertApi(myApi);
    }
}
